package admin_permissions

import (
	"time"
)

// 表名也是cache的tag
var TableName = "admin_permissions"

// @title AdminPermissions
// @description 权限表 pid/level 仅仅用来归类
type AdminPermissions struct {
	Id         int64     `xorm:"pk autoincr"`
	Name       string    `xorm:"varchar(64) notnull unique 'name'"`
	Sign       string    `xorm:"varchar(64) notnull 'sign'"`
	Pid        int64     `xorm:"integer notnull 'pid'"`
	Level      int       `xorm:"tinyint notnull 'level'"`
	HttpMethod string    `xorm:"varchar(128) notnull 'http_method'"`
	Route      string    `xorm:"varchar(64) notnull 'route'"`
	Status     int       `xorm:"tinyint null default(0) 'status'"`
	CreatedAt  time.Time `xorm:"notnull created 'created_at'"`
	UpdatedAt  time.Time `xorm:"null updated 'updated_at'"`
}
